﻿
using System.Data.Entity.ModelConfiguration;
using BeautyTech.Core.Domain.Orders;

namespace BeautyTech.Data.Configuration.Orders
{
    public class ShoppingCartItemConfiguration : EntityTypeConfiguration<ShoppingCartItem>
    {
        public ShoppingCartItemConfiguration()
        {
            this.HasRequired(sci => sci.Customer)
                .WithMany()
                .HasForeignKey(sci => sci.CustomerId);

            this.HasRequired(sci => sci.Product)
                .WithMany()
                .HasForeignKey(sci => sci.ProductId);
        }

    }
}
